FROM registry.cn-hangzhou.aliyuncs.com/aliyun-node/alinode:4.7
COPY . /root/
WORKDIR /root
RUN  npm config set sharp_binary_host "https://npm.taobao.org/mirrors/sharp" \
    && npm config set sharp_libvips_binary_host "https://npm.taobao.org/mirrors/sharp-libvips" \
    && npm config set disturl https://npm.taobao.org/dist --global \
    && npm config set puppeteer_download_host=https://npm.taobao.org/mirrors \
    && npm install --production --registry=https://registry.npm.taobao.org --canvas_binary_host_mirror=https://npm.taobao.org/mirrors/node-canvas-prebuilt/
EXPOSE 7001
ENTRYPOINT ["npm", "run", "start"]